package impl

import "github.com/rs/xid"

func (i *Impl) createSession(username string) string {
	i.lock.Lock()
	defer i.lock.Unlock()

	sess := xid.New().String()
	i.sessions[username] = sess
	return sess
}

func (i *Impl) deleteSession(username string) string {
	i.lock.Lock()
	defer i.lock.Unlock()

	sess := xid.New().String()
	delete(i.sessions, username)
	return sess
}
